1. /* sroequal.cpp by K.Tsuru */
  2. // function ID = 8003 BRADIX
  3. /*********************
  4. SRational class
  5. relational operator==
  6. *********************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. int operator==(const SRational& m, const SRational& n){
  11. if(m.Sign(7003) != n.Sign(7003)) return 0;
  12. if(m.ReduceDone() && n.ReduceDone()){ //Both are irreducible fractions.
  13. SLong t;
  14. if(LLCompare(m.NumNR(), n.NumNR())) return 0; //numerator is diffrent
  15. if(LLCompare(m.DenNR(), n.DenNR())) return 0; //denominator is different
  16. return 1;
  17. }
  18. if( RRCompare(m, n) ) return 0;
  19. return 1;
  20. }

sroequal.cpp : last modifiled at 2015/12/03 21:23:22(596 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).